UBCD INSERT Customizing and Persistence
Last modified 09-17-04: Charles Appel
UBCD Insert allows to you customize your environment in several ways. Note that this document
does not address "INSERT remastering", which is the process of modifying the INSERT cloop image itself.
For this, you'll want to check out KnoppixRemasterHowto.
Prior to burning your CD, you may want to consider adding some files to the ISO to enhance Insert.
- /INSERT/initparms
-
This file allows you to specify additional cheat codes that you always want processed on startup. A good example
is the TZ= cheat code, which will set the time zone for your locale. This file should contain a single line
of space
separated values. As an example, to set the time zone to Mountain Standard Time and insure Insert does not touch your hard drives upon
boot you would use:
TZ=MST nofstab noswap
- /INSERT/insert.sh
-
This file will be executed at the end of /etc/init.d/insert-autoconfig processing. It should be a standard shell
script (/bin/sh or /bin/bash) in Unix text format (Notepad won't do!). This can be helpful when you always
want to startup services or run commands upon startup. The 'NOINIT' cheat code, entered in at the
boot:
prompt will disable the automatic execution of insert.sh. Note that you should be
familiar with shell scripting
to use this feature.
- /INSERT/*.mod
-
Mod files are a new feature for UBCD Insert that allows you to add additional applications simply by
adding an Insert Module. See Modules for more information.
Persistence
Persistence involves retaining settings and configurations between boots. In order
to save your
settings you must have some form of removable media that Insert will recognize. Note that
very little attention or testing has gone into the ability to save settings to a local hard drive
as was/is supported in Insert and many Knoppix related distros. The reason for this is UBCD
Insert is intended to be used as a diagnostic and testing tool for many computers,
and therefore effort has gone in to portability (not in the sense of OS portability but physical
portability). If you are looking to install a Knoppix related distro to your local hard drive or
intend to use primarily on the same computer, there are perhaps better distributions
such
as Knoppix STD for you.
In addition to the cheat codes listed below, scanusb
will attempt to search all USB devices for
an /INSERT directory containing your home directory, init script or config archive. See
cheatcodes for more information.
Home Directory
From the Insert menu (Configuration->INSERT->Save home dir of user insert) you may elect to
save the entire contents of your home directory. This can be helpful when you want to preserve
any modifications to the fluxbox menu or save gpg keys, ssh keys, etc. The script is pretty self
explanatory so won't be discussed here in much detail. During script execution you will be asked
where to store your home dir. It is advised you select some sort of removable media although a floppy disk is probably too small. Note that
many USB drives are /dev/sddX, where X is the partition number (usually 1). Once the script finishes
your home directory is ready to go (unlike the original Insert in which you must reboot in order
to make the new home directory effective). In contrast to the Save Selectable Files option below,
you do not need to re-run this option again; as long as you mount your home directory, changes
will automatically be saved.
It should be noted that changing icon locations on the desktop will not be preserved if you use
modules, since these apps dynamically reset the icon placement and ordering.
To use your home directory upon subsequent bootups, you will need to have the media you saved your
home directory to. When Insert is initially started your will need to enter in one of the following cheat codes
at the boot prompt:
home=/dev/XXXN
-
Where XXX is a Linux device name and N is the partition number. Note that the device name may differ
from system to system, so it might require a boot or two if the device name Insert assigns your device
is not what you expect. For example, many USB drives are /dev/sdd, but on systems with several SCSI
controllers and disks, your USB drive could be /dev/sde. If the host computer does not have any SCSI
controllers, chances are your USB device name is /dev/sdd and your home directory is in partition 1.
home=scan
-
scan will search all drives and partitions Insert detects. This may well be the best option to use
unless you are planning on performing forensics on a drive; in which case you will not want Insert to
touch your disks.
Save Selectable Files
This feature has been enhanced from the original Insert so that the list of files Insert will save is
configured by the file /home/insert/restore.list. By editing this file you may include files you
wish to save. Not all files can be saved however, since files in most directories are read-only.
To access, select "Configuration->INSERT->Save selectable parts of config" from the main menu
or the Save Config icon on the desktop.
This option works best if you wish to save select files/directories in your home directory or
configuration files in /var or /etc. Check to see if the file you want to save is a link to /cdrom; if it
is, check the parent directory. If both are links you will not be able to save the file. If the directory is
not a link but the file is, you must save the entire directory. When saving directories, be sure to include
a trailing slash; see the /home/insert/restore.list file for examples.
Unlike the Home Directory option above, this method requires the user to re-run the script each time
you want to save new or updated configuration files. It will overwrite any previous config archive, so
be sure to restore (upon boot) your configuration if you want to retain settings.
To use your saved config you will need to input a cheat code at the boot:
startup prompt.
myconf=/dev/XXXN
-
Where XXX is a Linux device name and N is the partition number. Note that the device name may differ
from system to system, so it might require a boot or two if the device name Insert assigns your device
is not what you expect. For example, many USB drives are /dev/sdd, but on systems with several SCSI
controllers and disks, your USB drive could be /dev/sde. If the host computer does not have any SCSI
controllers, chances are your USB device name is /dev/sdd and your /INSERT/insert-config.tar.bz2 file
is in partition 1.
myconf=scan
-
scan will search all drives and partitions Insert detects for the file /INSERT/insert-config.tar.bz2. This may well be the best option to use
unless you are planning on performing forensics on a drive; in which case you will not want Insert to
touch your disks.
Initialization script
This feature allows you to create a shell script on removable media that gets executed after all other
initializations. There is no menu to help you set this up: you simply need to create a file called insert.sh
in a directory off root called INSERT. (So it would be /INSERT/insert.sh). This script is
helpful for running
services automatically from /etc/init.d or other special customizations. Note that you should be
familiar with shell scripting
to use this feature.
To run this file on startup, you will need to input one of the following cheat codes at the
boot:
prompt:
myinit=/dev/XXXN
-
Where XXX is a Linux device name and N is the partition number. Note that the device name may differ
from system to system, so it might require a boot or two if the device name Insert assigns your device
is not what you expect. For example, many USB drives are /dev/sdd, but on systems with several SCSI
controllers and disks, your USB drive could be /dev/sde. If the host computer does not have any SCSI
controllers, chances are your USB device name is /dev/sdd and your /INSERT/insert.sh file is in partition 1.
myinit=scan
-
scan will search all drives and partitions Insert detects for the file /INSERT/insert.sh. This may well be the best option to use
unless you are planning on performing forensics on a drive; in which case you will not want Insert to
touch your disks.